home *** CD-ROM | disk | FTP | other *** search
/ Action Games (2008) / akcnihry1.iso / AT-Robots 2.10 / INDIRECT.AT2 < prev    next >
Encoding:
Text File  |  1998-12-12  |  685 b   |  17 lines

  1. ; Test the indirect addressing
  2.  
  3. mov     CX,     512           ; Put the desired address in CX
  4. mov     [CX],   MAXINT        ; Now put MAXINT (32767 or 7FFFh into [CX]
  5. mov     BX,     512           ; Put the same address ito BX
  6. mov     AX,     [BX]          ; Read value stored at [BX] into AX
  7. err     AX                    ; Display it... It should be MAXINT.
  8.  
  9. delay   300                   ; Wait a bit
  10.  
  11. err     @512                  ; Display what is stored at @512, should be
  12.                               ; MAXINT as well, since that's where we
  13.                               ; kept it for this test.
  14.  
  15.  
  16. :1                            ; Test over; Freeze up.
  17. jmp     1